﻿using Viyi.Util.NameStyle;

namespace Viyi.Util
{
    public static class NameStyleConvert
    {
        public static readonly NameStyleCollection Styles = new NameStyleCollection();

        public static IStyleConverter GetStyle(string styleName)
        {
            return Styles[styleName];
        }

        public static string ToDefaultStyle(string name)
        {
            return Styles.Default.Convert(name);
        }

        public static string ToStyle(string name, string styleName)
        {
            return Styles[styleName].Convert(name);
        }

        public static string ToPascalStyle(string name)
        {
            return Styles.PascalStyle.Convert(name);
        }

        public static string ToCamelStyle(string name)
        {
            return Styles.CamelStyle.Convert(name);
        }

        public static string ToUnderscoreStyle(string name)
        {
            return Styles.UnderscoreStyle.Convert(name);
        }

        public static string ToHyphenStyle(string name)
        {
            return Styles.HyphenStyle.Convert(name);
        }
    }
}
